package com.module.user.ui.me.adapter

import com.chad.library.adapter.base.entity.SectionEntity
import com.module.user.R

data class ItemEntity(override val isHeader: Boolean) : SectionEntity {

    var leftImg: Int  = 0
    var itemMsg: Int = 0
    var rightImg: Int = 0
    var bottomLine: Boolean  = false //底部横线是否隐藏  true 隐藏   默认显示
    var data: Item? = null

    class Item {
        var img: Int? = 0
        var itemTitle: String? = ""//标题
        var itemMsg: String? = ""
        var starRating: Int? = 5 //默认5星好评
        var bottomLine: Boolean? = false //底部横线是否隐藏  true 隐藏   默认显示
        var tpye: Int? = 0 // 0 启动  1 下载
    }

    companion object{
        fun getData(): MutableList<ItemEntity> {
            val listData = ArrayList<ItemEntity>()
            //每周达人
            val item1 = ItemEntity(true)
            item1.leftImg = R.mipmap.ic_profile_expert
            item1.itemMsg = R.string.user_profile_weekly
            item1.rightImg = R.mipmap.ic_more_operation
            item1.bottomLine = false
            listData.add(item1)

            //糗百认证
            val item2 = ItemEntity(true)
            item2.leftImg = R.mipmap.icon_head_v
            item2.itemMsg = R.string.user_profile_certification
            item2.rightImg = R.mipmap.ic_more_operation
            item2.bottomLine = true
            listData.add(item2)

            //糗百认证
            val item6 = ItemEntity(true)
            item6.leftImg = R.mipmap.ic_profile_shop
            item6.itemMsg = R.string.user_profile_game
            item6.rightImg = R.mipmap.ic_more_operation
            item6.bottomLine = true
            listData.add(item6)

            // 游戏1
            val item7 = ItemEntity(false)
            val data1= Item()
            data1.img=R.mipmap.icon_youxi
            data1.itemTitle="侠客行"
            data1.itemMsg="赵客缦胡缨，吴钩霜雪明。银鞍照白马，飒沓如流星。十步杀一人，千里不留行。事了拂衣去，深藏身与名。闲过信陵饮，脱剑膝前横。将炙啖朱亥，持觞劝侯嬴。三杯吐然诺，五岳倒为轻。眼花耳热后，意气素霓生。救赵挥金锤，邯郸先震惊。"
            data1.tpye=0
            item7.data=data1
            listData.add(item7)

            // 游戏2
            val item8 = ItemEntity(false)
            val data2= Item()
            data2.img=R.mipmap.icon_youxi
            data2.itemTitle="侠客行2"
            data2.itemMsg="侠客行2,赵客缦胡缨，吴钩霜雪明。银鞍照白马，飒沓如流星。十步杀一人，千里不留行。事了拂衣去，深藏身与名。闲过信陵饮，脱剑膝前横。将炙啖朱亥，持觞劝侯嬴。三杯吐然诺，五岳倒为轻。眼花耳热后，意气素霓生。救赵挥金锤，邯郸先震惊。"
            data2.tpye=1
            data2.bottomLine=false
            item8.data=data2
            listData.add(item8)

            //腾讯大王卡
            val item3 = ItemEntity(true)
            item3.leftImg = R.mipmap.ic_more_img_light
            item3.itemMsg = R.string.user_profile_tencent
            item3.rightImg = R.mipmap.ic_more_operation
            item3.bottomLine = true
            listData.add(item3)

            //审核糗事
            val item4 = ItemEntity(true)
            item4.leftImg = R.mipmap.ic_profile_audit
            item4.itemMsg = R.string.user_profile_review
            item4.rightImg = R.mipmap.ic_more_operation
            item4.bottomLine = true
            listData.add(item4)

            //联系客服
            val item5 = ItemEntity(true)
            item5.leftImg = R.mipmap.ic_profile_feedback
            item5.itemMsg = R.string.user_profile_customer_service
            item5.rightImg = R.mipmap.ic_more_operation
            item5.bottomLine = true
            listData.add(item5)
            return listData;
        }
    }

}